=over

=item setsockopt SOCKET,LEVEL,OPTNAME,OPTVAL
X<setsockopt>

Sets the socket option requested.  Returns L<C<undef>|/undef EXPR> on
error.  Use integer constants provided by the L<C<Socket>|Socket> module
for
LEVEL and OPNAME.  Values for LEVEL can also be obtained from
getprotobyname.  OPTVAL might either be a packed string or an integer.
An integer OPTVAL is shorthand for pack("i", OPTVAL).

An example disabling Nagle's algorithm on a socket:

    use Socket qw(IPPROTO_TCP TCP_NODELAY);
    setsockopt($socket, IPPROTO_TCP, TCP_NODELAY, 1);

Portability issues: L<perlport/setsockopt>.

=back